﻿using System.Windows;
using Wp7nl.Utilities;

namespace Wp7nl.Behaviors
{
    /// <summary>
    ///     Behavior that sets the attached FrameworkElement to visibile if the app is in trial mode.
    /// </summary>
    public class VisibilityInTrialBehavior : SafeBehavior<FrameworkElement>
    {

        public Visibility Visibility { get; set; }

        protected override void OnAttached()
        {
            if (TrialHelper.IsTrial)
            {
                this.AssociatedObject.Visibility = this.Visibility;
            }
        }

    }
}